﻿// =====================================================================
// <copyright file="Errors.cs" author="David R. Guindo">
// 	Copyright (C) 2013. All rights reserved.
// </copyright>
// =====================================================================
// This code is released under the terms of the Apache 2.0 license, 
// http://apache.org/licenses/LICENSE-2.0.html
// =====================================================================

namespace AppBlock.Core
{
    using System;
    using System.Runtime.Serialization;
    using AppBlock.Core.Resources;

    [Serializable]
    public partial class EntityNotFoundException : Exception
    {
       /// <summary>
       ///    Initializes a new instance of the <see cref="EntityNotFoundException" /> class.
       /// </summary>
       public EntityNotFoundException() : base(Strings.Exception_EntityNotFound) { }

       protected EntityNotFoundException(SerializationInfo info, StreamingContext context): base(info, context) { }

       /// <summary>
       ///    Initializes a new instance of the <see cref="EntityNotFoundException" /> class.
       /// </summary>
       /// <param name="message"> The exception message. </param>
       public EntityNotFoundException(string message) : base(message) { }

       /// <summary>
       ///    Initializes a new instance of the <see cref="EntityNotFoundException" /> class.
       /// </summary>
       /// <param name="message"> The message. </param>
       /// <param name="innerEx"> The inner exception. </param>
       public EntityNotFoundException(string message, Exception innerEx) : base(message, innerEx) { }

       public override void GetObjectData(SerializationInfo info, StreamingContext context)
       {
          base.GetObjectData(info, context);
          ////info.AddValue("value", this.parameter);
       }
    }

    [Serializable]
    public partial class CoreException : Exception
    {
       /// <summary>
       ///    Initializes a new instance of the <see cref="CoreException" /> class.
       /// </summary>
       public CoreException() : base(Strings.Exception_Core) { }

       protected CoreException(SerializationInfo info, StreamingContext context): base(info, context) { }

       /// <summary>
       ///    Initializes a new instance of the <see cref="CoreException" /> class.
       /// </summary>
       /// <param name="message"> The exception message. </param>
       public CoreException(string message) : base(message) { }

       /// <summary>
       ///    Initializes a new instance of the <see cref="CoreException" /> class.
       /// </summary>
       /// <param name="message"> The message. </param>
       /// <param name="innerEx"> The inner exception. </param>
       public CoreException(string message, Exception innerEx) : base(message, innerEx) { }

       public override void GetObjectData(SerializationInfo info, StreamingContext context)
       {
          base.GetObjectData(info, context);
          ////info.AddValue("value", this.parameter);
       }
    }

    [Serializable]
    public partial class InvalidException : Exception
    {
       /// <summary>
       ///    Initializes a new instance of the <see cref="InvalidException" /> class.
       /// </summary>
       public InvalidException() : base(Strings.Exception_Invalid) { }

       protected InvalidException(SerializationInfo info, StreamingContext context): base(info, context) { }

       /// <summary>
       ///    Initializes a new instance of the <see cref="InvalidException" /> class.
       /// </summary>
       /// <param name="message"> The exception message. </param>
       public InvalidException(string message) : base(message) { }

       /// <summary>
       ///    Initializes a new instance of the <see cref="InvalidException" /> class.
       /// </summary>
       /// <param name="message"> The message. </param>
       /// <param name="innerEx"> The inner exception. </param>
       public InvalidException(string message, Exception innerEx) : base(message, innerEx) { }

       public override void GetObjectData(SerializationInfo info, StreamingContext context)
       {
          base.GetObjectData(info, context);
          ////info.AddValue("value", this.parameter);
       }
    }

    [Serializable]
    public partial class ValidationException : Exception
    {
       /// <summary>
       ///    Initializes a new instance of the <see cref="ValidationException" /> class.
       /// </summary>
       public ValidationException() : base(Strings.Exception_Validation) { }

       protected ValidationException(SerializationInfo info, StreamingContext context): base(info, context) { }

       /// <summary>
       ///    Initializes a new instance of the <see cref="ValidationException" /> class.
       /// </summary>
       /// <param name="message"> The exception message. </param>
       public ValidationException(string message) : base(message) { }

       /// <summary>
       ///    Initializes a new instance of the <see cref="ValidationException" /> class.
       /// </summary>
       /// <param name="message"> The message. </param>
       /// <param name="innerEx"> The inner exception. </param>
       public ValidationException(string message, Exception innerEx) : base(message, innerEx) { }

       public override void GetObjectData(SerializationInfo info, StreamingContext context)
       {
          base.GetObjectData(info, context);
          ////info.AddValue("value", this.parameter);
       }
    }

    [Serializable]
    public partial class ConfigException : Exception
    {
       /// <summary>
       ///    Initializes a new instance of the <see cref="ConfigException" /> class.
       /// </summary>
       public ConfigException() : base(Strings.Exception_Config) { }

       protected ConfigException(SerializationInfo info, StreamingContext context): base(info, context) { }

       /// <summary>
       ///    Initializes a new instance of the <see cref="ConfigException" /> class.
       /// </summary>
       /// <param name="message"> The exception message. </param>
       public ConfigException(string message) : base(message) { }

       /// <summary>
       ///    Initializes a new instance of the <see cref="ConfigException" /> class.
       /// </summary>
       /// <param name="message"> The message. </param>
       /// <param name="innerEx"> The inner exception. </param>
       public ConfigException(string message, Exception innerEx) : base(message, innerEx) { }

       public override void GetObjectData(SerializationInfo info, StreamingContext context)
       {
          base.GetObjectData(info, context);
          ////info.AddValue("value", this.parameter);
       }
    }

    [Serializable]
    public partial class DeleteException : Exception
    {
       /// <summary>
       ///    Initializes a new instance of the <see cref="DeleteException" /> class.
       /// </summary>
       public DeleteException() : base(Strings.Exception_Delete) { }

       protected DeleteException(SerializationInfo info, StreamingContext context): base(info, context) { }

       /// <summary>
       ///    Initializes a new instance of the <see cref="DeleteException" /> class.
       /// </summary>
       /// <param name="message"> The exception message. </param>
       public DeleteException(string message) : base(message) { }

       /// <summary>
       ///    Initializes a new instance of the <see cref="DeleteException" /> class.
       /// </summary>
       /// <param name="message"> The message. </param>
       /// <param name="innerEx"> The inner exception. </param>
       public DeleteException(string message, Exception innerEx) : base(message, innerEx) { }

       public override void GetObjectData(SerializationInfo info, StreamingContext context)
       {
          base.GetObjectData(info, context);
          ////info.AddValue("value", this.parameter);
       }
    }

    [Serializable]
    public partial class EntityWithDepenciesException : Exception
    {
       /// <summary>
       ///    Initializes a new instance of the <see cref="EntityWithDepenciesException" /> class.
       /// </summary>
       public EntityWithDepenciesException() : base(Strings.Exception_EntityWithDepencies) { }

       protected EntityWithDepenciesException(SerializationInfo info, StreamingContext context): base(info, context) { }

       /// <summary>
       ///    Initializes a new instance of the <see cref="EntityWithDepenciesException" /> class.
       /// </summary>
       /// <param name="message"> The exception message. </param>
       public EntityWithDepenciesException(string message) : base(message) { }

       /// <summary>
       ///    Initializes a new instance of the <see cref="EntityWithDepenciesException" /> class.
       /// </summary>
       /// <param name="message"> The message. </param>
       /// <param name="innerEx"> The inner exception. </param>
       public EntityWithDepenciesException(string message, Exception innerEx) : base(message, innerEx) { }

       public override void GetObjectData(SerializationInfo info, StreamingContext context)
       {
          base.GetObjectData(info, context);
          ////info.AddValue("value", this.parameter);
       }
    }
}
